<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <!-- 基础信息 -->
    <meta charset="utf-8">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="force-rendering" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="{$description}">
    <meta name="keywords" content="{$keywords}">
    <meta name="author" content="陌上花开">
    <title>{$title}</title>
    <!-- jQuery -->
    <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.5.1/jquery.min.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" type="text/css"
        href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/bootstrap/5.1.0/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="{__TEMPLATE_HOME_ASSETS__}SFnew/css/style.css">
    <link rel="stylesheet" type="text/css" href="{__TEMPLATE_HOME_ASSETS__}SFnew/css/mobile.css">
    <link rel="stylesheet" type="text/css" href="{__TEMPLATE_HOME_ASSETS__}SFnew/css/font.css">
    <link rel="stylesheet" type="text/css" href="{__TEMPLATE_HOME_ASSETS__}SFnew/css/loading.css">
    <link rel="stylesheet" type="text/css" href="{__TEMPLATE_HOME_ASSETS__}SFnew/css/animation.css">
    <link rel="stylesheet" type="text/css" href="{__TEMPLATE_HOME_ASSETS__}SFnew/css/cursor.css">
    <link rel="icon" href="/favicon.ico">
    <link rel="apple-touch-icon" href="{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/apple-touch-icon.png">
    <!-- Izitoast -->
    <link rel="stylesheet" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/izitoast/1.4.0/css/iziToast.min.css">
    <script type="text/javascript"
        src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/izitoast/1.4.0/js/iziToast.min.js">
    </script>
    <!-- IE Out -->
    <script>
        if ( /*@cc_on!@*/ false || (!!window.MSInputMethodContext && !!document.documentMode)) window.location.href =
            "{__TEMPLATE_HOME_ASSETS__}SFnew/upgrade-your-browser/index.html?referrer=" + encodeURIComponent(window.location.href);
    </script>
    <!-- 统计 -->
    {$background_image|raw}
    <style>
        .img{
            width: 7em;
            height: 7em;
            margin:auto;
            display: block;
            border-radius: 10em;
            box-shadow: 3px 3px 8px 1px silver;
            margin-bottom: 1em;
            object-fit: contain;
        }
    </style>
</head>

<body>
    <!--加载动画-->
    <div id="loading-box">
        <div class="loading-left-bg"></div>
        <div class="loading-right-bg"></div>
        <div class="spinner-box">
            <div class="loader">
                <div class="inner one"></div>
                <div class="inner two"></div>
                <div class="inner three"></div>
            </div>
            <div class="loading-word">
                <p class="loading-title">{$title}</p>
                <span id="loading-text">加载中</span>
            </div>
        </div>
    </div>
    <section id="section" class="section">
        <!-- 背景图片 -->
        <div class="bg-all">
            <img id="bg" onerror="this.classList.add('error');"></img>
            <div class="cover"></div>
        </div>
        <!--主体内容-->
        <main id="main" class="main">
            <div class="container" id="container">
                <div class="row" id="row">
                    <div class="col left">
                        <!--基本信息-->
                        <div class="main-left">
                            <!--Logo-->
                            <div class="main-img">
                                <img src="{notempty name='SF_Config.logo'}{$SF_Config.logo}{else/}{__IMG__}logo.png{/notempty}" alt="img">
                                <div class="img-title">
                                    <span class="img-text">{$title}</span>
                                </div>
                            </div>
                            <!--介绍信息-->
                            <div class="message cards sf" id="switchmore">
                                <div class="des" id="des"><i class="iconfont icon-yinhao-copy-copy"></i>
                                    <div class="des-title"><span id="change">{$SF_Config.title}</span><br /><span
                                            id="change1">{$description}</span></div>
                                    <i class="iconfont icon-yinhao-copy"></i>
                                </div>
                            </div>
                            <!--社交链接-->
                            <div class="social" id="social">
                                {php}
                                $i = 0;
                                foreach(explode("\n", conf('kfqq')) as $res){
                                    $item = explode('|',$res);
                                    echo '
                                    <a href="'.$item[0].'" class="link"
                                       id="qq'.$i.'" target="_blank">
                                        <i class="iconfont icon-QQ"></i>
                                    </a>';
                                    $i++;
                                }
                                {/php}
                                <a id="link-text">通过这里联系我</a>
                            </div>
                        </div>
                    </div>
                    <!--第二屏 Logo-->
                    <div class="logo cards" style="display: none" id="changemore">
                        <a class="logo-text">{$title}</a>
                    </div>
                    <div class="col right">
                        <div class="main-right">
                            <!--功能区-->
                            <div class="row rightone" id="rightone">
                                <div class="col hitokotos">
                                    <!--一言-->
                                    <div class="hitokoto cards" id="hitokoto">
                                        <div class="hitokoto-all">
                                            <div class="hitokoto-text"><span id="hitokoto_text">每一个人都应该明确自己的方向和位置</span>
                                            </div>
                                            <div class="hitokoto-from">-「&nbsp;<span id="from_text">陌上花开</span>&nbsp;」
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col times">
                                    <!--时间-->
                                    <div class="time cards">
                                        <div class="timeshow" id="time">
                                            2000&nbsp;年&nbsp;0&nbsp;月&nbsp;00&nbsp;日&nbsp;<span
                                                class="weekday">星期一</span><br><span class="time-text">00:00:00</span>
                                        </div>
<!--                                        <div class="weather">-->
<!--                                            <span id="city_text">天气</span>&nbsp;-->
<!--                                            <span id="wea_text">加载失败</span>&nbsp;-->
<!--                                            <span id="tem_night"></span>°C~-->
<!--                                            <span id="tem_day"></span>°C-->
<!--                                            &lt;!&ndash; <span id="win_text"></span>-->
<!--                                            <span id="win_speed"></span> &ndash;&gt;-->
<!--                                        </div>-->
                                    </div>
                                </div>
                            </div>
                            <!--分隔线-->
                            <div class="line">
                                <i class="iconfont icon-link"></i>
                                <span class="line-text">功能列表</span>
                            </div>
                            <!--网站链接-->
                            <div class="link">
                                <!--第一组-->
                                <div class="row">
                                    <div class="col">
                                        <a href="#" id="auth">
                                            <div class="link-card cards">
                                                <i class="iconfont icon-blog-solid"></i>
                                                <span class="link-name">授权查询</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col 2">
                                        <a href="#" id="user">
                                            <div class="link-card cards">
                                                <i class="iconfont icon-cloud"></i>
                                                <span class="link-name">权限查询</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col">
                                        <a href="#" id="pay">
                                            <div class="link-card cards">
                                                <i class="iconfont icon-music-list"></i>
                                                <span class="link-name">认证查询</span>
                                            </div>
                                        </a>
                                    </div>
                                </div>
                                <!--第二组-->
                                <div class="row" style="margin-top: 1.5rem;">
                                    <div class="col">
                                        <a href="/user.php/Index/index" target="_blank">
                                            <div class="link-card cards">
                                                <i class="iconfont icon-a-daohangzhiyindingwei-05"></i>
                                                <span class="link-name">登陆后台</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col 2">
                                        <a href="/index.php/Index/download" target="_blank">
                                            <div class="link-card cards">
                                                <i class="iconfont icon-z_shangpinheji"></i>
                                                <span class="link-name">源码下载</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col">
                                        <a href="#" id="reg">
                                            <div class="link-card cards">
                                                <i class="iconfont icon-lab"></i>
                                                <span class="link-name">注册用户</span>
                                            </div>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--展开菜单按钮-->
                <div class="menu" id="switchmenu">
                    <a class="munu-button cards" id="menu"><i class="iconfont icon-bars"></i></a>
                </div>
                <!--更多内容-->
                <div class="more" id="more">
                    <!--关闭按钮-->
                    <div class="close fixed-top" id="close">
                        <i class="iconfont icon-close"></i>
                    </div>
                    <!--网站链接-->

                    <div id="queryForm" class="container" style="display:none">
                        <div class="row">
                            <div class="col-md-4 col-sm-4 col-xs-12">
                                <img id="logo" class="img" src="{notempty name='SF_Config.logo'}{$SF_Config.logo}{else/}{__IMG__}logo.png{/notempty}"/>

                                <div id="introduce" class="form-group" style="margin: 1rem;display: none;">
                                    <div class="sf-introduce">
                                        <div id="introduceContent"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-4 col-sm-8 col-xs-12">
                                <input type="hidden" name="query_type" value="">
                                <div class="form-group" style="margin: 1rem">
                                    <select name="appid" class="sf-select sf-input">
                                        <option value="">请选择应用</option>
                                        {volist name="app_list.data.data" id="res"}
                                        <option value="{$res.id}">{$res.name}</option>
                                        {/volist}
                                    </select>
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <input type="text" name="auth_info" class="sf-input" placeholder="请输入要查询的内容">
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <a href="#" id="query">
                                        <div class="link-card cards">
                                            <span class="link-name">查询</span>
                                        </div>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="registerForm" class="container" style="display:none">
                        <div class="row">
                            <div class="col-md-4 col-sm-6 col-xs-12">
                                <div class="form-group" style="margin: 1rem">
                                    <select name="appid" class="sf-select sf-input">
                                        <option value="">请选择应用</option>
                                        {volist name="app_list.data.data" id="res"}
                                        <option value="{$res.id}">{$res.name}</option>
                                        {/volist}
                                    </select>
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <input type="text" name="username" class="sf-input" placeholder="请输入要注册的用户名">
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <input type="password" name="password" class="sf-input" placeholder="请输入密码">
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <input type="password" name="confirmPassword" class="sf-input" placeholder="请确认密码">
                                </div>
                            </div>
                            <div class="col-md-4 col-sm-6 col-xs-12">
                                <div class="form-group" style="margin: 1rem">
                                    <input type="number" name="qq" class="sf-input" placeholder="请输入要绑定的QQ">
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <input type="text" name="email" class="sf-input" placeholder="请输入要绑定的邮箱">
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <input type="number" name="phone" class="sf-input" placeholder="请输入要绑定的手机号">
                                </div>
                                <div class="form-group" style="margin: 1rem">
                                    <a href="#" id="register">
                                        <div class="link-card cards">
                                            <span class="link-name">注册</span>
                                        </div>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        <!-- 版权信息 -->

        <footer id="footer" class="fixed-bottom footer">
            <div class="power">
                {:conf('foot')}&emsp;{:conf('ICP')}
            </div>
            <!-- 歌词显示 -->
        </footer>
    </section>
    <!-- noscript -->
    <noscript>
        <div class="noscript fixed-top">请开启 JavaScript</div>
    </noscript>
    <!-- JS -->
    {$background_notice|raw}
    {$background_music|raw}
    <script>
        function SF_Loading(type = false){
            if(!type){
                $('#loading-box').attr('class', 'loaded');
                $('#bg').css('cssText', 'transform: scale(1);filter: blur(0px);transition: ease 1.5s;');
                $('.cover').css('cssText', 'opacity: 1;transition: ease 1.5s;');
                $('#section').css('cssText', 'transform: scale(1) !important;opacity: 1 !important;filter: blur(0px) !important');
            }else{
                $('#loading-box').attr('class', '');
                $('#bg').css('cssText', '');
                $('.cover').css('cssText', '');
                $('#section').css('cssText', '');
            }
        }
        //弹窗样式
        iziToast.settings({
            timeout: 10000,
            progressBar: false,
            close: false,
            closeOnEscape: true,
            position: 'topCenter',
            transitionIn: 'bounceInDown',
            transitionOut: 'flipOutX',
            displayMode: 'replace',
            layout: '1',
            backgroundColor: '#00000040',
            titleColor: '#efefef',
            messageColor: '#efefef',
            iconColor: '#efefef',
        });

        //加载完成后执行
        window.addEventListener('load', function () {

            //载入动画
            SF_Loading();

            //用户欢迎
            setTimeout(function () {
                iziToast.show({
                    timeout: 2500,
                    title: hello,
                    message: '欢迎来到{$title}'
                });
            }, 800);
        }, false)

        setTimeout(function () {
            $('#loading-text').html("字体及文件加载可能需要一定时间")
        }, 3000);

        //新春灯笼 （ 需要时取消注释 ）
        {eq name="SF_Config.newYear" value="1"}
        new_element=document.createElement("link");
        new_element.setAttribute("rel","stylesheet");
        new_element.setAttribute("type","text/css");
        new_element.setAttribute("href","{__TEMPLATE_HOME_ASSETS__}SFnew/css/lantern.css");
        document.body.appendChild(new_element);

        new_element=document.createElement("script");
        new_element.setAttribute("type","text/javascript");
        new_element.setAttribute("src","{__TEMPLATE_HOME_ASSETS__}SFnew/js/lantern.js");
        document.body.appendChild(new_element);
        {/eq}

        //火狐浏览器独立样式
        if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) {
            var head = document.getElementsByTagName('head')[0];
            var link = document.createElement('link');
            link.href = '{__TEMPLATE_HOME_ASSETS__}SFnew/css/firefox.css';
            link.rel = 'stylesheet';
            link.type = 'text/css';
            head.appendChild(link);
            window.addEventListener('load', function () {
                iziToast.show({
                    timeout: 8000,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    message: '您正在使用火狐浏览器，部分功能可能不支持'
                });
            }, false)
        }

        //获取一言
        fetch('https://v1.hitokoto.cn?max_length=24')
            .then(response => response.json())
            .then(data => {
                $('#hitokoto_text').html(data.hitokoto)
                $('#from_text').html(data.from)
            })
            .catch(console.error)


        //获取时间
        var t = null;
        t = setTimeout(time, 1000);

        function time() {
            clearTimeout(t);
            dt = new Date();
            var y = dt.getYear() + 1900;
            var mm = dt.getMonth() + 1;
            var d = dt.getDate();
            var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
            var day = dt.getDay();
            var h = dt.getHours();
            var m = dt.getMinutes();
            var s = dt.getSeconds();
            if (h < 10) {
                h = "0" + h;
            }
            if (m < 10) {
                m = "0" + m;
            }
            if (s < 10) {
                s = "0" + s;
            }
            //document.getElementById("time").innerHTML = y + "&nbsp;年&nbsp;" + mm + "&nbsp;月&nbsp;" + d + "&nbsp;日&nbsp;" + "<span class='weekday'>" + weekday[day] + "</span><br>" + "<span class='time-text'>" + h + ":" + m + ":" + s + "</span>";
            $("#time").html(y + "&nbsp;年&nbsp;" + mm + "&nbsp;月&nbsp;" + d + "&nbsp;日&nbsp;" + "<span class='weekday'>" + weekday[day] + "</span><br>" + "<span class='time-text'>" + h + ":" + m + ":" + s + "</span>");
            t = setTimeout(time, 1000);
        }

        //链接提示文字
        $("#social").mouseover(function () {
            $("#social").css({
                "background": "rgb(0 0 0 / 25%)",
                'border-radius': '6px',
                "backdrop-filter": "blur(5px)"
            });
            $("#link-text").css({
                "display": "block",
            });
        }).mouseout(function () {
            $("#social").css({
                "background": "none",
                "border-radius": "6px",
                "backdrop-filter": "none"
            });
            $("#link-text").css({
                "display": "none"
            });
        });

        {php}
        $i = 0;
        foreach(explode("\n", conf('kfqq')) as $res){
            $item = explode('|',$res);
            echo '
            $("#qq'.$i.'").mouseover(function () {
                $("#link-text").html("'.$item[1].'");
            }).mouseout(function () {
                $("#link-text").html("通过这里联系我");
            });
            ';
            $i++;
        }
        {/php}


        //更多页面切换
        var shoemore = false;
        $('#auth').on('click', function () {
            shoemore = !shoemore;
            $("input[name='query_type']").val('auth');
            if (shoemore) {
                $('#container').attr('class', 'container mores');
                $('#queryForm').css('display','inherit');
            } else {
                $('#container').attr('class', 'container');
                $('#queryForm').css('display','none');
            }
        });

        $('#user').on('click', function () {
            shoemore = !shoemore;
            $("input[name='query_type']").val('user');
            if (shoemore) {
                $('#container').attr('class', 'container mores');
                $('#queryForm').css('display','inherit');
            } else {
                $('#container').attr('class', 'container');
                $('#queryForm').css('display','none');
            }
        });

        $('#pay').on('click', function () {
            shoemore = !shoemore;
            $("input[name='query_type']").val('pay');
            if (shoemore) {
                $('#container').attr('class', 'container mores');
                $('#queryForm').css('display','inherit');
            } else {
                $('#container').attr('class', 'container');
                $('#queryForm').css('display','none');
            }
        });

        $('#reg').on('click', function () {
            shoemore = !shoemore;
            if (shoemore) {
                $('#container').attr('class', 'container mores');
                $('#registerForm').css('display','inherit');
            } else {
                $('#container').attr('class', 'container');
                $('#registerForm').css('display','none');
            }
        });

        //更多页面关闭按钮
        $('#close').on('click', function () {
            shoemore = !shoemore;
            if (shoemore) {
                $('#container').attr('class', 'container mores');
            } else {
                $('#container').attr('class', 'container');
                $('#queryForm').css('display','none');
                $('#registerForm').css('display','none');
            }
        });


        $('#register').on('click', function () {
            var appid = $("select[name='appid']").val();
            var username = $("input[name='username']").val();
            var password = $("input[name='password']").val();
            var confirmPassword = $("input[name='confirmPassword']").val();
            var qq = $("input[name='qq']").val();
            var email = $("input[name='email']").val();
            var phone = $("input[name='phone']").val();

            if(appid == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '注册通知',
                    message: '请选择需要注册的应用！'
                });
                return false;
            }
            if(username == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '注册通知',
                    message: '请输入用户名！'
                });
                return false;
            }
            if(password == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '注册通知',
                    message: '请输入密码！'
                });
                return false;
            }
            if(confirmPassword == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '注册通知',
                    message: '请输入确认密码！'
                });
                return false;
            }
            if(qq == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '注册通知',
                    message: '请输入要绑定的QQ！'
                });
                return false;
            }
            if(email == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '注册通知',
                    message: '请输入要绑定的邮箱！'
                });
                return false;
            }
            if(phone == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '注册通知',
                    message: '请输入要绑定的手机号！'
                });
                return false;
            }
            SF_Loading(true);
            $.ajax({
                type: "POST",
                url: '{:url("/Ajax/register")}',
                data: {'username':username,'appid':appid,'password':password,'confirmPassword':confirmPassword,'qq':qq,'email':email,'phone':phone},
                dataType: "json",
                success: function(data) {
                    SF_Loading();
                    if (data.code == 0) {
                        iziToast.show({
                            timeout: 2500,
                            iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/success.png',
                            title: '注册通知',
                            message: data.msg
                        });
                    } else {
                        iziToast.show({
                            timeout: 2500,
                            iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/error.png',
                            title: '注册通知',
                            message: data.msg
                        });
                    }
                },
                error: function() {
                    SF_Loading();
                    iziToast.show({
                        timeout: 2500,
                        iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/error.png',
                        title: '注册通知',
                        message: '服务器错误'
                    });
                }
            });
        });

        $('#query').on('click', function () {
            var query_type = $("input[name='query_type']").val();
            var appid = $("select[name='appid']").val();
            var auth_info = $("input[name='auth_info']").val();

            if(appid == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '消息通知',
                    message: '请选择需要查询的应用！'
                });
                return false;
            }
            if(auth_info == ''){
                iziToast.show({
                    timeout: 2500,
                    iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                    title: '消息通知',
                    message: '请输入需要查询的内容！'
                });
                return false;
            }
            SF_Loading(true);
            $.ajax({
                type: "POST",
                url: '{:url("/Ajax/queryAuth")}',
                data: {'query_type':query_type,'appid':appid,'auth_info':auth_info},
                dataType: "json",
                success: function(data) {
                    SF_Loading();
                    if (data.code == 0) {
                        if(data.data.status == 1){
                            iziToast.show({
                                timeout: 2500,
                                iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/success.png',
                                title: '查询通知',
                                message: data.msg
                            });
                        }else{
                            iziToast.show({
                                timeout: 2500,
                                iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/info.png',
                                title: '查询通知',
                                message: data.msg
                            });
                        }
                    } else {
                        iziToast.show({
                            timeout: 2500,
                            iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/error.png',
                            title: '查询通知',
                            message: data.msg
                        });
                    }
                },
                error: function() {
                    SF_Loading();
                    iziToast.show({
                        timeout: 2500,
                        iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/error.png',
                        title: '注册通知',
                        message: '服务器错误'
                    });
                }
            });
        });

        $(".sf-select").on('change', function () {

            //获取选中的value值
            var value = $(".sf-select").val();
            if(value == ''){
                $("#logo").attr('src','{notempty name="SF_Config.logo"}{$SF_Config.logo}{else/}{__IMG__}logo.png{/notempty}');
            }else{
                SF_Loading(true);
                $.ajax({
                    type: "POST",
                    url: '{:url("/Ajax/appInfo")}',
                    data: {appid:value},
                    dataType: "json",
                    success: function(data) {
                        SF_Loading();
                        if (data.code == 0) {
                            iziToast.show({
                                timeout: 2500,
                                iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/success.png',
                                title: '获取通知',
                                message: '获取信息成功！'
                            });
                            $("#introduceContent").html(data.data.introduce?data.data.introduce:'暂无介绍');
                            $("#introduce").css('display','inherit');
                            $("#logo").attr('src',data.data.logo);
                        } else {
                            iziToast.show({
                                timeout: 2500,
                                iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/error.png',
                                title: '获取通知',
                                message: data.msg
                            });
                        }
                    },
                    error: function() {
                        SF_Loading();
                        iziToast.show({
                            timeout: 2500,
                            iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/error.png',
                            title: '获取通知',
                            message: '服务器错误'
                        });
                    }
                });
            }
        });

        //移动端菜单栏切换
        var switchmenu = false;
        $('#switchmenu').on('click', function () {
            switchmenu = !switchmenu;
            if (switchmenu) {
                $('#row').attr('class', 'row menus');
                $("#menu").html("<i class='iconfont icon-times'></i>");
            } else {
                $('#row').attr('class', 'row');
                $("#menu").html("<i class='iconfont icon-bars'>");
            }
        });

        //更多弹窗页面
        $('#openmore').on('click', function () {
            $('#box').css("display", "block");
            $('#row').css("display", "none");
            $('#more').css("cssText", "display:none !important");
        });
        $('#closemore').on('click', function () {
            $('#box').css("display", "none");
            $('#row').css("display", "flex");
            $('#more').css("display", "flex");
        });

        //监听网页宽度
        window.addEventListener('load', function () {
            window.addEventListener('resize', function () {
                //关闭移动端样式
                if (window.innerWidth >= 600) {
                    $('#row').attr('class', 'row');
                    $("#menu").html("<i class='iconfont icon-bars'>");
                    //移除移动端切换功能区
                    $('#rightone').attr('class', 'row rightone');
                }
            })
        })

        //移动端切换功能区
        var changemore = false;
        $('#changemore').on('click', function () {
            changemore = !changemore;
            if (changemore) {
                $('#rightone').attr('class', 'row menus mobile');
            } else {
                $('#rightone').attr('class', 'row menus');
            }
        });

        //更多页面显示关闭按钮
        $("#more").hover(function () {
            $('#close').css("display", "block");
        }, function () {
            $('#close').css("display", "none");
        })

        //屏蔽右键
        document.oncontextmenu = function () {
            iziToast.show({
                timeout: 2000,
                iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/warn.png',
                message: '为了浏览体验，本站禁用右键'
            });
            return false;
        }

        //自动变灰
        var myDate = new Date;
        var mon = myDate.getMonth() + 1;
        var date = myDate.getDate();
        var days = ['4.4', '5.12', '7.7', '9.9', '9.18', '12.13'];
        for (var day of days) {
            var d = day.split('.');
            if (mon == d[0] && date == d[1]) {
                document.write(
                    '<style>html{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);_filter:none}</style>'
                )
                $("#change").html("Silence&nbsp;in&nbsp;silence");
                $("#change1").html("今天是中国国家纪念日，全站已切换为黑白模式");
                window.addEventListener('load', function () {
                    iziToast.show({
                        timeout: 14000,
                        iconUrl: '{__TEMPLATE_HOME_ASSETS__}SFnew/img/icon/candle.png',
                        message: '今天是中国国家纪念日'
                    });
                }, false);
            }
        }
    </script>
    <script type="text/javascript" src="{__TEMPLATE_HOME_ASSETS__}SFnew/js/time.js"></script>
    <script type="text/javascript" src="{__TEMPLATE_HOME_ASSETS__}SFnew/js/js.cookie.js"></script>
    <script type="text/javascript" src="{__TEMPLATE_HOME_ASSETS__}SFnew/js/cursor.js"></script>
    <script type="text/javascript"
        src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/bootstrap/5.1.0/js/bootstrap.min.js">
    </script>
</body>
</html>